package com.estar.integaration.Reader.Listener;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.estar.integaration.Util.Util;
import com.estar.integaration.entity.paymentPlanEntity.ReceiptComeLedger;
import lombok.AllArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * Author: YJL
 * Date: 2022/2/17 16:45
 **/
@AllArgsConstructor
public class ReceiptComeLedgerListener extends AnalysisEventListener<ReceiptComeLedger> {

  List<ReceiptComeLedger> receiptComeLedgerList = new ArrayList<>();

  @Override
  public void invoke(ReceiptComeLedger receiptComeLedger, AnalysisContext analysisContext) {
    receiptComeLedger.setId(Util.getUUID());
    receiptComeLedgerList.add(receiptComeLedger);
  }

  @Override
  public void doAfterAllAnalysed(AnalysisContext analysisContext) {

  }
}
